import java.util.*;

public abstract class ObjModel extends ObjectModel {
  protected String _name;
  protected OBJModel _model;

  ObjModel(PApplet parent, String name, PVector p, int s) {
    this._name = name;
    this._pos = p;
    this._model = new OBJModel(parent, this._name, "relative", TRIANGLES);
    this._model.translateToCenter();
    this._scale = s;
    BoundingBox tmp = new BoundingBox(parent, this._model);
    this._size = tmp.getWHD();
    this._boundingbox = new BoundingBoxModel(new PVector(this._pos.x - (this._scale * (this._size.x/2.0)), this._pos.y - (this._scale * (this._size.y/2.0)), this._pos.z), new PVector(this._pos.x + (this._scale * (this._size.x/2.0)), this._pos.y + (this._scale * (this._size.y/2.0)), this._pos.z));
    this._selected = false;
    this._state = 0;
    this._canBeMoved = true;
  } 

  public abstract void draw();
  public abstract void update();
}

